﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Web;
using Gollie.WebCache;

namespace Gollie
{
	public static class CacheConfig
	{
		internal static string OffersChanged = "OffersChanged";

		private static Collection<string> CacheKeys;

		internal static void Init()
		{
			CacheKeys = new Collection<string>();

			CacheKeys.Add(OffersChanged);

			foreach (string key in CacheKeys)
			{
				DataCache.Insert(key, (ulong)0);
			}
		}

		internal static void Invalidate(string key)
		{
			ulong v = (ulong)DataCache.Cache[key];
			v++;
			DataCache.Insert(key, v);
		}
	}
}